import {StrictMode, Suspense} from "react";
import zhCN from "antd/locale/zh_CN";
import {ConfigProvider, Spin} from "antd";
import ReactDOM from "react-dom/client";
import {RouterProvider} from "react-router-dom";
import routes from "@/router/router";
import "@/assets/style/index.css";

ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
    <StrictMode>
        <ConfigProvider locale={zhCN}>
            <Suspense fallback={<Spin style={{flex: 1}} />}>
                <RouterProvider router={routes} />
            </Suspense>
        </ConfigProvider>
    </StrictMode>
);
